<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"   prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" 	 prefix="fmt" %>
<%@ page import="grupobbva.pe.operhc.domain.SegUsuario"%>
<%@page import="grupobbva.pe.operhc.util.Constant"%>

<jsp:useBean id="now" class="java.util.Date" scope="request" />
<fmt:formatDate value="${now}" var="formattedDate" type="date" pattern="dd/MM/yyyy" />
<fmt:formatDate value="${now}" var="formattedTime" type="date" pattern="HH:mm:ss" />
<% SegUsuario usuarioSession = (SegUsuario)request.getSession().getAttribute("usuarioSession");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
String versionApp=(String)request.getSession().getAttribute(Constant.VERSIONAPP_SESSION);
%>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Contrato - Gestor de Campa�as</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/ui.jqgrid.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.2.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/operhc_style.css" />
	<link rel="stylesheet" type="text/css" media="print"  href="<%=request.getContextPath()%>/css/print.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/buttonOHC.css" />
	
	<script type="text/javascript" src='<%= request.getContextPath()%>/dwr/interface/ConsultaActualAction.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/util.js'></script>
	<script src="<%=request.getContextPath()%>/js/util/gridUtil.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery-1.7.1.js" type="text/javascript"></script>	
	<script src="<%=request.getContextPath()%>/js/i18n/grid.locale-es.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery.jqGrid.src.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/grid.subgrid.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/util/encabezado.js?ver<%=versionApp%>" type="text/javascript"></script>
	 
<style type="text/css">


	table.ambox {
		font-family: verdana,arial,sans-serif;
		font-size:10px;
		color:#2e6e9e;	
		border-color: #c5dbec;
		border-collapse: collapse;
	}
	table.ambox th {
		background:#E6F3FD;	
		padding: 2px;	
		border-style: solid;
		border-color: #c5dbec;		
	}
	table.ambox td {
		background:#FDFDF0;	
		padding: 1px;
		border-style: solid;
		border-color: #c5dbec;
	}
  </style>
	
<script type="text/javascript" charset="UTF-8">

function printpage(){
	window.print();
}
</script>
</head>
<body>
<html:form styleId="formContrato" method="post" action="consultaActualForm.do?method=imprimirContratoGestorCampania">

<div style="font-size: xx-small; width: 100%; text-align: right;"><%=usuarioSession.getCodigo()%> | <c:out value="${sessionScope.usuarioHOST.oficinaPertenencia}"/> | <c:out value="${formattedDate}" /> | <c:out value="${formattedTime}" /></div>
<p />

<table class="ambox" align="center" width="100%" border="1" cellspacing="0" cellpadding="0">
	
<!-- 	<tr> -->
<!-- 	<td align="left" width="30%">&nbsp;Nº Contrato Generado:</td> -->
<!-- 	<td align="left" width="70%"> -->
<%-- 	&nbsp;<span><c:out value="${command.numeroContrato}"/></span> --%>
<!-- 	</td> -->
<!-- 	</tr> -->
	
<!-- 	<tr> -->
<!-- 	<td width="20%" align="left">&nbsp;Fecha:</td> -->
<!-- 	<td width="30%" align="left"> -->
<%-- 	&nbsp;<span><c:out value="${currentDate}"/></span> --%>
<!-- 	</td> -->
<!-- 	<td width="20%" align="left">&nbsp;Fecha:</td> -->
<!-- 	<td width="30%" align="left"> -->
<%-- 	&nbsp;<span><c:out value="${currentDate}"/></span> --%>
<!-- 	</td> -->
<!-- 	</tr> -->
	
	<tr>
	<th colspan="4" align="left" bgcolor="#0066bb">DATOS GENERALES</th>
	</tr>
		
	<tr>
	<td width="20%" align="left">&nbsp;Cliente:</td>
	<td width="30%" align="left">
	&nbsp;<span>DNI: <c:out value="${sessionScope.clienteSession.numeroDocumento}"/></span>
	</td>
	<td width="20%" align="left">&nbsp;Código Central:</td>
	<td width="30%" align="left"><c:out value="${sessionScope.clienteSession.codigoCentral}"/></td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Nombre:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.razonSocial}"/></span>
	</td>
	<td align="left">&nbsp;</td>
	<td align="left">&nbsp;</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Score Buro:</td>
	<td align="left">&nbsp;<span><c:out value="${sessionScope.clienteSession.grupoBuro}"/></span></td>
	<td align="left">&nbsp;Fecha Evaluación:</td>
	<td align="left">&nbsp;<span><c:out value="${sessionScope.clienteSession.fechaEvaluacion}"/></span></td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Clasificación BBVA:</td>
	<td align="left">&nbsp;<span><c:out value="${sessionScope.clienteSession.clasificacionBBVA}"/></span></td>
	<td align="left">&nbsp;Clasificación SBS</td>
	<td align="left">&nbsp;<span><c:out value="${sessionScope.clienteSession.clasificacionSF}"/></span></td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Tipo Oferta:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.segmentoCampania}"/></span>
	</td>
	<td align="left">&nbsp;Flujo Contratación</td>
	<td align="left">&nbsp;<span><c:out value="${sessionScope.clienteSession.flujoOperativo}"/></span></td>
	</tr>
	

	
	<tr>
	<td align="left">&nbsp;Oficina:</td>
	<td colspan="3" align="left">
	&nbsp;<span><c:out value="${sessionScope.usuarioHOST.oficinaPertenencia}"/></span>
	</td>
	</tr>
	
	<tr>
	<c:if test="${command.familia eq FAMILIA_TARJETAS}">
		<td align="left">&nbsp;Gestor/Vendedor:</td>
	</c:if>
	<c:if test="${command.familia ne FAMILIA_TARJETAS}">
		<td align="left">&nbsp;Registro Vendedor:</td>
	</c:if>
	<td colspan="3" align="left">
	&nbsp;<span><c:out value="${command.usuarioVendedor}"/> - <c:out value="${command.nombreCompletoVendedor}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Registro Usuario:</td>
	<td colspan="3" align="left">
	&nbsp;<span><c:out value="${sessionScope.usuarioSession.codigo}"/> - <c:out value="${sessionScope.usuarioSession.nombreCompleto}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Canal de Venta:</td>
	<td colspan="3" align="left">
	&nbsp;<span><c:out value="${command.canal}"/> - <c:out value="${command.desCanal}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Sub-Canal de Venta:</td>
	<td colspan="3" align="left">
	&nbsp;<span><c:out value="${command.subCanal}"/> - <c:out value="${command.desSubCanal}"/></span>
	</td>

	</tr>
	
	<tr>
	
	<th colspan="4" align="left">
	&nbsp;<span>Cuota Apróximada que incluye seguros y comisiones. No se incluye seguro vehícular </span>
	</th>

	</tr>
	
	<tr>
	<th colspan="4" align="left" bgcolor="#0066bb">DATOS DE LA OFERTA DEL PRODUCTO</th>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Producto:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.desProducto}"/></span>
	</td>
	<td align="left">&nbsp;Contrato:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.numeroContrato}"/></span>
	</td>	
	</tr>
	
	<tr>
	<td align="left">&nbsp;Sub-Producto:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.desSubProducto}"/></span>
	</td>
	<td align="left">&nbsp;Cuenta Cargo:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.cuentaCargo}"/></span>
	</td>	
	</tr>
	
	<c:if test="${command.familia eq FAMILIA_TARJETAS}">
		
		<tr>
		<td align="left">&nbsp;Tipo:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.valTipo}"/></span>
		</td>
		<td align="left">&nbsp;Bin:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.valBin}"/></span>
		</td>
		</tr>			
	</c:if>
	
	<tr>
	<td align="left">&nbsp;Divisa:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.divisa}"/></span>
	</td>
	<td align="left">&nbsp;Importe:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.importe}"/></span>
	</td>
	</tr>
	
	
<%-- 	<c:if test="${command.familia ne FAMILIA_TARJETAS}"> --%>
	
		<tr>
		<td align="left">&nbsp;Tasa:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.tasa}"/></span>
		</td>
		<td align="left">&nbsp;Plazo:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.plazo}"/></span>
		</td>
		</tr>
		
<%-- 	</c:if> --%>
	
	<tr>
	<td align="left">&nbsp;Cuota Aproximada:</td>
	<td align="left"><span><c:out value="${command.cuotaContrato}"/></span></td>
	<td align="left">&nbsp;Fecha Alta:</td>
	<td align="left"><span><c:out value="${command.fechaAlta}"/></span></td>
	</tr>
	
	<c:if test="${command.familia eq FAMILIA_TARJETAS}">
	
		<tr>
		<td align="left">&nbsp;Días Liq.:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.diaLiquidacion}"/></span>
		</td>
		<td align="left">&nbsp;Forma de Pago:</td>
		<td align="left">
		&nbsp;<span><c:out value="${command.formaPago}"/></span>
		</td>
		</tr>
		
	</c:if>		
	
	<tr>
	<td align="left">&nbsp;Gestor:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.gestor}"/></span>
	</td>
	<td align="left">&nbsp;Nro. Solicitud:</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.numeroSolicitud}"/></span>
	</td>
	
	</tr>
	
	
	<tr>
	<th colspan="4" align="left" bgcolor="#0066bb">DATOS DEL CONTRATO ORIGINAL</th>
	</tr>
	<tr>
		<td align="left">&nbsp;Contrato Original:</td>
		<td colspan="3" align="left">&nbsp;<span><c:out value="${command.contratoOriginal}"/></span></td>
	</tr>
	<tr>
		<td align="left">&nbsp;Linea Vigente:</td>
		<td align="left">&nbsp;<span><c:out value="${command.lineaCredito}"/></span></td>
		<td align="left">&nbsp;Saldo Pendiente:</td>
		<td align="left">&nbsp;<span><c:out value="${command.saldoPendientePago}"/></span></td>
	</tr>

</table>

<div id="divButtonPrint">
<br/>
<%--
<input type="button" value="Imprimir" onclick="printpage()" />
 --%>
 
&nbsp;<a href="#" onclick="printpage();" class="buttonOHC">IMPRIMIR</a>
</div>

<span>
	<html:html>${command.mensajePiePagina}</html:html>
</span>



</html:form>
</body>
</html>